/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stringhelper;

import java.util.Scanner;

/**
 *
 * @author Welcome
 */
public class StatementHandler {
    private String strStatement;
    private StatementID statementID=new StatementID();
    private SQLStatement sqlStatement;

    public SQLStatement getSqlStatement() {
        return sqlStatement;
    }
    
    public StatementHandler(String sqlString)
    {
        this.strStatement = sqlString;
        strStatement.toLowerCase();
    }
    
    public void Cutter() throws Exception
    {
        KindOfStatement k = statementID.getID(strStatement);
        switch (k)
        {
            case SELECT:
                sqlStatement = new SelectStatement(strStatement);
                break;
            case CREATE:
                sqlStatement = new CreateStatement(strStatement);
                break;
            case INSERT:
                sqlStatement = new InsertStatement(strStatement);
                break;
            case DELETE:
                sqlStatement = new DeleteStatement(strStatement);
                
        }
        sqlStatement.getData();
        
    }
    
   
}
